
<!-- $Id: comment_list.htm 14216 2008-03-10 02:27:21Z testyang $ -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
  <title>ECSHOP 管理中心 - 用户评论 </title>
  <base href="__ROOT__/admin/" />
  <meta name="robots" content="noindex, nofollow">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link href="styles/general.css" rel="stylesheet" type="text/css">
  <link href="styles/main.css" rel="stylesheet" type="text/css">

  <script src="__ROOT__/admin/js/jquery-2.1.4.min.js"></script>
  <style>
    .panel-icloud .panel-right iframe {
      height: 300px;
      margin-top: 15px;
    }
    .panel-hint{
      top: 0%;
    }
  </style>

  <script>
    <!--
    // 这里把JS用到的所有语言都赋值到这里
    var process_request = "正在处理您的请求...";
    var todolist_caption = "记事本";
    var todolist_autosave = "自动保存";
    var todolist_save = "保存";
    var todolist_clear = "清除";
    var todolist_confirm_save = "是否将更改保存到记事本？";
    var todolist_confirm_clear = "是否清空内容？";
    var no_content = "回复的评论内容不能为空!";
    //-->
    /*关闭按钮*/
    function get_certificate(){
      var panel = document.getElementById('panelCloud');
      var mask  = document.getElementById('CMask')||null;
      var frame = document.getElementById('CFrame');
      if(panel&&CMask&&frame){
        panel.style.display = 'block';
        mask.style.display = 'block';
        frame.src = 'https://openapi.shopex.cn/oauth/authorize?response_type=code&client_id=yogfss4l&redirect_uri=http%3A%2F%2Flocalhost%2Fdayi%2Fecshop%2Fecshop%2Fadmin%2Fcertificate.php%3Fact%3Dget_certificate%26type%3Dindex&view=auth_ecshop';
      }
    }

    /*关闭按钮*/
    function btnCancel(item){
      var par  = item.offsetParent;
      var mask  = document.getElementById('CMask')||null;
      var frame = document.getElementById('CFrame');
      par.style.display = 'none';
      if(mask){mask.style.display = 'none';}
      frame.src = '';
    }
  </script>
</head>
<body>
<!--云起激活系统面板-->
<div class="panel-hint panel-icloud" id="panelCloud">
  <div class="panel-cross"><span onclick="btnCancel(this)">Ｘ</span></div>
  <div class="panel-title">
    <span class="tit">您需要激活系统</span>
    <p>用云起账号激活您的系统，享受物流查询，天工收银，手机短信等更多应用和服务</p>
  </div>
  <div class="panel-left">
    <span>没有云起账号吗？</span>
    <p>点击下列按钮一步完成注册激活！</p>
    <a href="https://account.shopex.cn/reg?refer=yunqi_ecshop" target="_blank" class="btn btn-yellow">免费注册云起账号</a>
  </div>
  <div class="panel-right">
    <h5 class="logo">云起</h5>
    <p>正在激活中</p>
    <iframe src="comment_manage.html" id="CFrame" frameborder="0"></iframe>
    <div class="cloud-passw">
      <a target="_blank" href="https://account.shopex.cn/forget?">忘记密码？</a>
    </div>
  </div>
</div>
<!--云起激活系统面板-->
<!--遮罩-->
<div class="mask-black" id="CMask"></div>
<!--遮罩-->
<h1>

  <span class="action-span1"><a href="http://localhost/dayi/ecshop/ecshop/admin/index.php?act=main">ECSHOP 管理中心</a> </span><span id="search_id" class="action-span1">&nbsp;&nbsp;&gt;&nbsp;&nbsp;用户评论 </span>
  <div style="clear:both"></div>
</h1><script type="text/javascript" src="comment_manage_data/utils.js"></script><script type="text/javascript" src="comment_manage_data/listtable.js"></script><div class="form-div">

  <form action="javascript:searchComment()" name="searchForm">
    <img src="images/icon_search.svg" alt="SEARCH" width="26" height="22" border="0">
    输入评论内容 
    <input name="con" type="text" id="con"> 
    <input class="btn" value=" 搜索 " type="button" >
  </form>

</div>

<form method="POST" action="comment_manage.php?act=batch_drop" name="listForm" onsubmit="return confirm_bath()">

  <!-- start comment list -->
  <div class="list-div" id="listDiv">

    <table cellspacing="1" cellpadding="3">
      <tbody><tr>
        <th>
          <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox">
          <a href="javascript:listTable.sort('comment_id');">评论编号</a> </th>
        <th><a href="javascript:listTable.sort('user_name');">评论商品编号</a></th>
        <th><a href="javascript:listTable.sort('user_name');">评论商品名称</a></th>
        <th><a href="javascript:listTable.sort('comment_type');">评论内容</a></th>
        <th><a href="javascript:listTable.sort('id_value');">评论者姓名</a></th>
        <th><a href="javascript:listTable.sort('ip_address');">评论时间</a></th>
        <th><a href="javascript:listTable.sort('add_time');">是否显示状态</a><img src="images/sort_desc.png"></th>

        <th>操作</th>
      </tr>
      <tbody id="comment_list">
      <?php foreach($arr['list'] as $k=>$v){?>
      <tr comment_id="{$v.comment_id}">
        <td><input value="6" name="checkboxes[]" type="checkbox">{$v.comment_id}</td>
        <td>{$v.goods_id}</td>
        <td>{$v.goods_name}</td>
        <td>{$v.content}</td>
        <td><a href="http://localhost/dayi/ecshop/ecshop/goods.php?id=59" target="_blank"> {$v.user_name} </a></td>
        <td align="center">{$v.add_date}</td>
        <td align="center">{$v.status}</td>
        <td align="center">
          <a href="http://localhost/dayi/ecshop/ecshop/admin/comment_manage.php?act=reply&amp;id=6">查看详情</a> |
          <a href="http://www.jodieme.cn/index.php/admin/comment/del?id={$v.comment_id}">移除</a>
        </td>
      </tr>
      <?php }?>
</tbody>
      </tbody></table>

    <table cellspacing="0" cellpadding="4">
      <tbody><tr>
        <!-- <td>
          <div>
            <select name="sel_action">.
              <option value="remove" selected="selected">删除评论</option>
              <option value="allow">允许显示</option>
              <option value="deny">禁止显示</option>
            </select>
            <input name="act" value="batch" type="hidden">
            <input name="drop" id="btnSubmit" value=" 确定 " class="button" disabled="true" type="submit"></div></td> -->
        <td align="right"><!-- $Id: page.htm 14216 2008-03-10 02:27:21Z testyang $ -->
          <div id="turn-page">
            <span id="pageCurrent">{$arr.arr.page}</span> / <span id="totalPages">{$arr.arr.last}</span>
            页，每页 <input size="3" id="pageSize" value="{$arr.arr.limit}" onkeypress="return listTable.changePageSize(event)" type="text">
            条记录，总共 <span id="totalRecords">{$arr.arr.num}</span>
            条记录
          <span id="page-link" >
    <a href="javascript:void (0); "page=1>第一页</a>
    <a href="javascript:void (0);" page="{$arr.arr.top}">上一页</a>
    <a href="javascript:void (0)" page="{$arr.arr.down}">下一页</a>
    <a href="javascript:void (0)" page="{$arr.arr.last}">最末页</a>
    <select id="gotoPage" onchange="listTable.gotoPage(this.value)">
      <option value="1" selected="selected">1</option></select>
  </span>
          </div>
        </td>
      </tr>
      </tbody></table>

  </div>
  <!-- end comment list -->

</form>
<script type="text/javascript" language="JavaScript">
//   <!--
//   listTable.recordCount = 3;
//   listTable.pageCount = 1;
//   cfm = new Object();
//   cfm['allow'] = '你确定要允许显示所选评论吗？';
//   cfm['remove'] = '你确定要删除所选评论吗？';
//   cfm['deny'] = '你确定要禁止显示所选评论吗？';

//   listTable.filter.keywords = '0';
//   listTable.filter.sort_by = 'add_time';
//   listTable.filter.sort_order = 'DESC';
//   listTable.filter.record_count = '3';
//   listTable.filter.page_size = '15';
//   listTable.filter.page = '1';
//   listTable.filter.page_count = '1';
//   listTable.filter.start = '0';


//   onload = function()
//   {
//     document.forms['searchForm'].elements['keyword'].focus();
//     // 开始检查订单
//     startCheckOrder();
//   }
//   /**
//    * 搜索评论
//    */
//   function searchComment()
//   {
//     var keyword = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
//     if (keyword.length > 0)
//     {
//       listTable.filter['keywords'] = keyword;
//       listTable.filter.page = 1;
//       listTable.loadList();
//     }
//     else
//     {
//       document.forms['searchForm'].elements['keyword'].focus();
//     }
//   }


//   function confirm_bath()
//   {
//     var action = document.forms['listForm'].elements['sel_action'].value;

//     return confirm(cfm[action]);
//   }
//   //-->
// </script>
<div id="footer">
  共执行 7 个查询，用时 0.008872 秒，Gzip 已禁用，内存占用 1.344 MB<br>
  版权所有 © 2005-2018 上海商派软件有限公司，并保留所有权利。</div>
<!-- 新订单提示信息 -->
<div id="popMsg">
  <table width="100%" cellspacing="0" cellpadding="0" border="0" bgcolor="#cfdef4">
    <tbody><tr>
      <td style="color: #0f2c8c" width="30" height="24"></td>
      <td style="font-weight: normal; color: #1f336b; padding-top: 4px;padding-left: 4px" width="100%" valign="center"> 新订单通知</td>
      <td style="padding-top: 2px;padding-right:2px" width="19" valign="center" align="right"><span title="关闭" style="cursor: hand;cursor:pointer;color:red;font-size:12px;font-weight:bold;margin-right:4px;" onclick="Message.close()">×</span><!-- <img title=关闭 style="cursor: hand" onclick=closediv() hspace=3 src="msgclose.jpg"> --></td>
    </tr>
    <tr>
      <td style="padding-right: 1px; padding-bottom: 1px" colspan="3" height="70">
        <div id="popMsgContent">
          <p>您有 <strong style="color:#ff0000" id="spanNewOrder">1</strong> 个新订单以及       <strong style="color:#ff0000" id="spanNewPaid">0</strong> 个新付款的订单</p>
          <p style="word-break:break-all" align="center"><a href="http://localhost/dayi/ecshop/ecshop/admin/order.php?act=list"><span style="color:#ff0000">点击查看新订单</span></a></p>
        </div>
      </td>
    </tr>
    </tbody></table>
</div>

<!--
<embed src="images/online.wav" width="0" height="0" autostart="false" name="msgBeep" id="msgBeep" enablejavascript="true"/>
-->
<!-- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" id="msgBeep" width="1" height="1">
  <param name="movie" value="images/online.swf">
  <param name="quality" value="high">
  <embed src="comment_manage_data/online.swf" name="msgBeep" id="msgBeep" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash" width="0" height="0">

</object> -->

<script language="JavaScript">

    $(document).on('click','#page-link a,.btn',function(){
       var con=$('#con').val();
    
       var page=$(this).attr('page');
       a(con,page)

    })


function a(con,page)
{

  $.ajax({
        url:"{:url('Comment/comment_manage')}",
        data:{page:page,con:con},
        type:'get',
        dataType:'json',
        success:function(res){

            console.log(res)

                $('#turn-page').html('<span id="pageCurrent">'+res.arr.page+'</span> / <span id="totalPages">'+res.arr.last+'</span>页，每页 <input size="3" id="pageSize" value="'+res.arr.limit+'" onkeypress="return listTable.changePageSize(event)" type="text">条记录，总共 <span id="totalRecords">'+res.arr.num+'</span>条记录<span id="page-link" ><a href="javascript:void (0); "page=1>第一页</a><a href="javascript:void (0);" page="'+res.arr.top+'">上一页</a><a href="javascript:void (0)" page="'+res.arr.down+'">下一页</a><a href="javascript:void (0)" page="'+res.arr.last+'">最末页</a><select id="gotoPage" onchange="listTable.gotoPage(this.value)"><option value="1" selected="selected">1</option></select></span>');

                   $('#comment_list').empty();

                   $.each(res.list,function(i,v){
                       var tr = $("<tr></tr>");
                         // tr.append(' <td style="background-color: rgb(255, 255, 255);"><input name="checkboxes[]" value="72" type="checkbox"></td>')
                        tr.append('<td><input value="6" name="checkboxes[]" type="checkbox">'+v.comment_id+'</td>')
                        tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.goods_id+'</td>')
                         tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.goods_name+'</td>')
                        tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.content+'</td>')
                        tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.user_name+'</td>')
                        tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.add_date+'</td>')
                        tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.status+'</td>')
                        // tr.append(' <td style="background-color: rgb(255, 255, 255);">'+v.flag+'</td>')
                        tr.append('<td align="center"><a href="http://localhost/dayi/ecshop/ecshop/admin/comment_manage.php?act=reply&amp;id=6">查看详情</a>|<a href="http://www.jodieme.cn/index.php/admin/comment/del?id='+v.comment_id+'">移除</a></td>')

                               $('#comment_list').append(tr);
                      
                   })
                
        }

     })

}















  // document.onmousemove=function(e)
  //         {
  //           var obj = Utils.srcElement(e);
  //           if (typeof(obj.onclick) == 'function' && obj.onclick.toString().indexOf('listTable.edit') != -1)
  //           {
  //             obj.title = '点击修改内容';
  //             obj.style.cssText = 'background-color: #eee;';
  //             obj.onmouseout = function(e)
  //             {
  //               this.style.cssText = '';
  //             }
  //           }
  //           else if (typeof(obj.href) != 'undefined' && obj.href.indexOf('listTable.sort') != -1)
  //           {
  //             obj.title = '点击对列表排序';
  //           }
  //         }
  //         <!--


  // var MyTodolist;
  // function showTodoList(adminid)
  // {
  //   if(!MyTodolist)
  //   {
  //     var global = $import("../js/global.js","js");
  //     global.onload = global.onreadystatechange= function()
  //     {
  //       if(this.readyState && this.readyState=="loading")return;
  //       var md5 = $import("js/md5.js","js");
  //       md5.onload = md5.onreadystatechange= function()
  //       {
  //         if(this.readyState && this.readyState=="loading")return;
  //         var todolist = $import("js/todolist.js","js");
  //         todolist.onload = todolist.onreadystatechange = function()
  //         {
  //           if(this.readyState && this.readyState=="loading")return;
  //           MyTodolist = new Todolist();
  //           MyTodolist.show();
  //         }
  //       }
  //     }
  //   }
  //   else
  //   {
  //     if(MyTodolist.visibility)
  //     {
  //       MyTodolist.hide();
  //     }
  //     else
  //     {
  //       MyTodolist.show();
  //     }
  //   }
  // }

  // if (Browser.isIE)
  // {
  //   onscroll = function()
  //   {
  //     //document.getElementById('calculator').style.top = document.body.scrollTop;
  //     document.getElementById('popMsg').style.top = (document.body.scrollTop + document.body.clientHeight - document.getElementById('popMsg').offsetHeight) + "px";
  //   }
  // }

  // if (document.getElementById("listDiv"))
  // {
  //   document.getElementById("listDiv").onmouseover = function(e)
  //   {
  //     obj = Utils.srcElement(e);

  //     if (obj)
  //     {
  //       if (obj.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode;
  //       else if (obj.parentNode.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode.parentNode;
  //       else return;

  //       for (i = 0; i < row.cells.length; i++)
  //       {
  //         if (row.cells[i].tagName != "TH") row.cells[i].style.backgroundColor = '#F4FAFB';
  //       }
  //     }

  //   }

  //   document.getElementById("listDiv").onmouseout = function(e)
  //   {
  //     obj = Utils.srcElement(e);

  //     if (obj)
  //     {
  //       if (obj.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode;
  //       else if (obj.parentNode.parentNode.tagName.toLowerCase() == "tr") row = obj.parentNode.parentNode;
  //       else return;

  //       for (i = 0; i < row.cells.length; i++)
  //       {
  //         if (row.cells[i].tagName != "TH") row.cells[i].style.backgroundColor = '#FFF';
  //       }
  //     }
  //   }

  //   document.getElementById("listDiv").onclick = function(e)
  //   {
  //     var obj = Utils.srcElement(e);

  //     if (obj.tagName == "INPUT" && obj.type == "checkbox")
  //     {
  //       if (!document.forms['listForm'])
  //       {
  //         return;
  //       }
  //       var nodes = document.forms['listForm'].elements;
  //       var checked = false;

  //       for (i = 0; i < nodes.length; i++)
  //       {
  //         if (nodes[i].checked)
  //         {
  //           checked = true;
  //           break;
  //         }
  //       }

  //       if(document.getElementById("btnSubmit"))
  //       {
  //         document.getElementById("btnSubmit").disabled = !checked;
  //       }
  //       for (i = 1; i <= 10; i++)
  //       {
  //         if (document.getElementById("btnSubmit" + i))
  //         {
  //           document.getElementById("btnSubmit" + i).disabled = !checked;
  //         }
  //       }
  //     }
  //   }

  // }

  //-->
</script>

</body></html>